<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/7/10
 * Time: 17:39
 */
namespace common\components\services\integral;

use common\components\bases\BaseBehavior;
use common\components\helpers\EventData;

class IntegralBehavior extends BaseBehavior{


    public function afterInsert($event){
        $eventKey=(new EventData(['className'=>get_class($this),'classOwner'=>get_class($this->owner),'eventName'=>$event->name,'handler'=>__FUNCTION__]))->getEventKey();
        $integralManage=\Yii::createObject([
            'class'=>IntegralEventManage::className(),
            'evenArray'=>$event,
            'ownerArray'=>$this->owner->attributes,
            'eventKey'=>$eventKey
        ]);
        $integralManage->afterInsertSend();
    }
}